#ifndef _ERRNO_H
#define _ERRNO_H

#define	EPERM		1	/* Operation not permitted */
#define	EIO			5	/* I/O error */
#define	ENOMEM		12	/* Out of memory */
#define	EFAULT		14	/* Bad address */
#define	EBUSY		16	/* Device or resource busy */
#define	ENODEV		19	/* No such device */
#define	EINVAL		22	/* Invalid argument */
#define EROFS       30  /* Read-only file system */
#define ERANGE      34  /* Math result not representable */

#define	EBADMSG		74	/* Not a data message */
#define	EUCLEAN		117	/* Structure needs cleaning */

#define ENOTSUPP    524 /* Operation is not supported */

#define MAX_ERRNO   1024
#define IS_ERR(x)	((unsigned int)(x) >= (unsigned int)-MAX_ERRNO)
#define ERR_PTR(x)	((void *)(x))
#define PTR_ERR(x)	((int)(x))

#endif
